<template>
	<view class="main1">
		<view class="info">
			<u-parse :scrollTable="true" :content="content"></u-parse>
		</view>
	</view>
</template>

<script>
import { httpTokenRequest } from '@/utils/http.js';
export default {
	data() {
		return {
			content: '',
		};
	},
	methods: {
		getInfo(type) {
			httpTokenRequest({
				url: '/api/index/getConfig',
				method: 'POST',
				params: {
					name: type
				}
			})
				.then((res) => {
					if (res.code == 1) {
						this.content = res.data;
					} else {
						this.$tools.showToast(res.msg);
					}
				})
				.catch((err) => {
					console.log('错误回调', err);
					this.$tools.showToast(err);
				});
		},
		menuClick(item) {
			this.$used.href(item.url);
		},
	},
	onLoad(e) {
		this.getInfo(e.type);
		uni.setNavigationBarTitle({
			title: e.name
		});
	},
	onShow() {
	},
};
</script>

<style lang="scss">
.main1 {
	position: relative;
	min-height: 100vh;
	background-color: #ffffff;

	.info {
		padding: 50rpx;
		border-top: 14rpx solid #fafafa;
	}
}
</style>
